package com.jieao.content.dto;

import com.jieao.content.domain.Diary;
import com.jieao.content.domain.DiarySub;
import com.jieao.framework.util.ShiroUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * @Description
 * @Author weifanl
 * @Date2020/5/26 13:40
 **/
@Data
@EqualsAndHashCode(callSuper=true)
public class DiaryDto extends Diary {
    private String catalogName;

    private String content;

    private Long parentId;

    private String timeOption;

    public DiaryDto(){
        setDelFlag(0);

        setUpdateBy(ShiroUtils.getLoginName());
        setUpdateTime(new Date());
    }
    public DiarySub createDiarySub(){
        return  new DiarySub(content);
    }

}
